package com.bawei.base.room

import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query

@Dao
interface MessageDao {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insert(messageEntity: MessageEntity)

    @Query("select * from messageEntity where goodsId=:goodsId")
    fun query(goodsId:Int):MutableList<MessageEntity>

    @Delete
    fun delete(messageEntity: MessageEntity)
}